home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update21.zoo / bison / Makefile.tos < prev    next >
Encoding:
Makefile  |  1992-05-13  |  3.6 KB  |  112 lines

  1. # Makefile for bison
  2. # Copyright (C) 1984, 1989, 1991 Bob Corbett and Free Software Foundation, Inc.
  3. # This file is part of Bison, the GNU Compiler Compiler.
  4. # Bison is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. # Bison is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with Bison; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. CC = cgcc
  17. INSTALL = 
  18. INSTALL_PROGRAM = $(INSTALL)
  19. INSTALL_DATA = $(INSTALL)
  20.  
  21. # Things you might add to DEFS:
  22. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  23. # -DUSG            If you have System V/ANSI C string and
  24. #            memory functions and headers.
  25. DEFS =  -DSTDC_HEADERS
  26.  
  27. CDEBUG = -O2 -fomit-frame-pointer -fstrength-reduce
  28. CFLAGS = $(CDEBUG) $(DEFS)
  29. LDFLAGS = 
  30.  
  31. LIBS = 
  32.  
  33. # names of parser files
  34. PFILE = bison.sim
  35. PFILE1 = bison.hai
  36.  
  37. PFILES = -DXPFILE=\"$(PFILE)\" \
  38.      -DXPFILE1=\"$(PFILE1)\"
  39.  
  40. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  41.       getargs.o gram.o lalr.o lex.o                    \
  42.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  43.       warshall.o version.o                        \
  44.       getopt.o getopt1.o
  45.  
  46. all: bison
  47.  
  48. clean:
  49.     rm -f *.o core bison
  50.  
  51. install: bison
  52.     $(INSTALL) bison $(BINDIR)
  53. # Copy bison.simple, inserting directory name into the #line commands.
  54.     cp $(PFILE1) $(PARSERDIR)
  55.     $(INSTALL) bison.1 $(MANDIR)/bison.$(MANEXT)
  56.     chmod a+r $(PARSERDIR)/$(PFILE) $(PARSERDIR)/$(PFILE1) 
  57.     chmod a+r $(MANDIR)/bison.$(MANEXT)
  58.  
  59. bison: $(OBJECTS)
  60.     $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  61.  
  62. dist:
  63.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  64.     -rm -rf `cat .fname`
  65.     mkdir `cat .fname`
  66.     ln  COPYING ChangeLog Makefile REFERENCES bison.1 \
  67.         bison.simple bison.hairy mergedir.awk \
  68.         LR0.c allocate.c closure.c conflicts.c derives.c \
  69.         files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  70.         output.c print.c reader.c reduce.c symtab.c version.c \
  71.         warshall.c files.h gram.h lex.h machine.h new.h state.h \
  72.         symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  73.         vmshlp.mar README bison.texinfo bison.info* \
  74.       `cat .fname`
  75.     cp -p ../lib/getopt.[ch] ../lib/getopt1.c `cat .fname`
  76.     tar chZf `cat .fname`.tar.Z `cat .fname`
  77.     -rm -rf `cat .fname` .fname
  78. .PHONY: dist
  79.  
  80. TAGS: *.c *.h
  81.     etags *.c *.h
  82.  
  83. # This file is different to pass the parser file names
  84. # to the compiler.
  85. files.o: files.c
  86.     $(CC) -c $(CFLAGS) $(PFILES) files.c $(OUTPUT_OPTION)
  87.  
  88. LR0.o: system.h machine.h new.h gram.h state.h
  89. closure.o: system.h machine.h new.h gram.h
  90. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  91. derives.o: system.h new.h types.h gram.h
  92. files.o: system.h files.h new.h gram.h
  93. getargs.o: system.h files.h
  94. lalr.o: system.h machine.h types.h state.h new.h gram.h
  95. lex.o: system.h files.h symtab.h lex.h
  96. main.o: system.h machine.h
  97. nullable.o: system.h types.h gram.h new.h
  98. output.o: system.h machine.h new.h files.h gram.h state.h
  99. print.o: system.h machine.h new.h files.h gram.h state.h
  100. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  101. reduce.o: system.h machine.h files.h new.h gram.h
  102. symtab.o: system.h new.h symtab.h gram.h
  103. warshall.o: system.h machine.h
  104.  
  105. # Prevent GNU make v3 from overflowing arg limit on SysV.
  106. .NOEXPORT:
  107.  
  108.